﻿# Includes Germany, NGF, and SGF

# common variables
@coa_width = 768
@coa_height = 512
@canton_scale_cross_x = @[ ( 333 / coa_width ) + 0.001 ]
@canton_scale_cross_y = @[ ( 205 / coa_height ) + 0.001 ]
@canton_scale_sweden_x = @[ ( 255 / coa_width ) + 0.001 ]
@canton_scale_sweden_y = @[ ( 204 / coa_height ) + 0.001 ]
@canton_scale_norway_x = @[ ( 192 / coa_width ) + 0.001 ]
@canton_scale_norway_y = @[ ( 192 / coa_height ) + 0.001 ]
@canton_scale_denmark_x = @[ ( 220 / coa_width ) + 0.001 ]
@canton_scale_denmark_y = @[ ( 220 / coa_height ) + 0.001 ]
@third = @[1/3]

## Germany ##

GER = { # Germany
	flag_definition = {
		coa = GER_WB_default # WB edit
		subject_canton = GER_WB_default
	}
	flag_definition = {
		coa = GER_NGF_absolute_monarchy # WB edit
		subject_canton = GER_NGF_absolute_monarchy
		priority = 5
		trigger = {
			coa_def_autocracy_flag_trigger = yes
		}
	}
	flag_definition = {
		coa = GER_modern
		subject_canton = GER_modern
		priority = 10
		trigger = { 
			coa_def_republic_flag_trigger = yes
		}
	}
	flag_definition = {
		coa = GER_dictatorship
		subject_canton = GER_dictatorship
		priority = 15
		trigger = { 
			coa_def_dictatorship_flag_trigger = yes
		}
	}
	flag_definition = {
		coa = GER_communist
		subject_canton = GER_communist
		priority = 1500
		trigger = { 
			coa_def_communist_flag_trigger = yes
		}
	}	
	flag_definition = {
		coa = GER_fascist
		subject_canton = GER_fascist
		priority = 1500
		trigger = { 
			coa_def_fascist_flag_trigger = yes
		}
	}
	
	# Vanilla's post patch 1.2 additional unifiers
	
	#flag_definition = {
	#	coa = GER_bavarian
	#	subject_canton = GER_bavarian
	#	priority = 100
	#	trigger = {
	#		exists = scope:actor
	#		scope:actor = {
	#			has_law = law_type:law_monarchy
	#			was_formed_from = BAV
	#		}
	#	}
	#}	
	
	#flag_definition = {
	#	coa = GER_austrian
	#	subject_canton = GER
	#	priority = 100
	#	trigger = {
	#		exists = scope:actor
	#		scope:actor = {
	#			has_law = law_type:law_monarchy
	#			was_formed_from = AUS
	#		}
	#	}
	#}	

	#flag_definition = {
	#	coa = GER_saxon
	#	subject_canton = GER_saxon
	#	priority = 100
	#	trigger = {
	#		exists = scope:actor
	#		scope:actor = {
	#			has_law = law_type:law_monarchy
	#			was_formed_from = SAX
	#		}
	#	}
	#}

	flag_definition = {
		coa = GER_saxon_monarchist
		subject_canton = GER_saxon_monarchist
		priority = 30
		trigger = {
			coa_def_absolute_monarchy_flag_trigger = yes
			exists = scope:actor
			scope:actor = {
				was_formed_from = SAX
			}
		}
	}

	#flag_definition = {
	#	coa = GER_hannover
	#	subject_canton = GER_hannover
	#	priority = 100
	#	trigger = {
	#		exists = scope:actor
	#		scope:actor = {
	#			has_law = law_type:law_monarchy
	#			was_formed_from = HAN
	#		}
	#	}
	#}

	flag_definition = {
		coa = GER_wurttemberg
		subject_canton = GER_wurttemberg
		priority = 30
		trigger = {
			exists = scope:actor
			scope:actor = {
				has_law = law_type:law_monarchy
				was_formed_from = WUR
			}
		}
	}

	#flag_definition = {
	#	coa = GER
	#	subject_canton = GER
	#	priority = 100
	#	trigger = {
	#		exists = scope:actor
	#		scope:actor = {
	#			has_law = law_type:law_monarchy
	#			was_formed_from = PRU
	#		}
	#	}
	#}
	
	#flag_definition = {
	#	coa = GER_iron_cross
	#	subject_canton = GER_iron_cross
	#	priority = 5
	#	trigger = {
	#		coa_def_autocracy_flag_trigger = yes
	#		exists = scope:actor
	#		scope:actor = {
	#			was_formed_from = PRU
	#		}
	#	}
	#}
	
	flag_definition = {
		coa = GER_nihilist
		coa = subject_canton
		priority = 1500
		trigger = { 
			coa_def_nihilist_flag_trigger = yes
		}
	}
	
	# WB originals
	
	flag_definition = {
		coa = NGF_anarchist
		subject_canton = NGF_anarchist
		priority = 1501
		trigger = { 
			coa_def_anarchy_flag_trigger = yes
		}
	}
	
	flag_definition = {
		coa = GER_theocracy
		subject_canton = GER_theocracy
		priority = 15
		trigger = { 
			coa_def_theocracy_flag_trigger = yes
		}
	}
	
	flag_definition = {
		# Spartacus revolt
		coa = NGF_communist
		subject_canton = NGF_communist
		priority = 1502
		trigger = {
			coa_def_communist_flag_trigger = yes
			coa_def_secessionist_or_revolutionary_trigger = yes
		}
	}
	
	flag_definition = {
		coa = GER_flag_hole_republic
		subject_canton = GER_flag_hole_republic
		priority = 1610
		allow_revolutionary_indicator = no
		trigger = {
			exists = c:GER
			exists = scope:actor
			
			coa_def_secessionist_or_revolutionary_trigger = yes
			
			scope:actor = {
				is_secessionist = no
				OR = {
					has_law = law_type:law_presidential_republic
					has_law = law_type:law_parliamentary_republic
				}
			}
			
			c:GER = {
				has_law = law_type:law_council_republic
			}
		}
	}
	
	flag_definition = {
		coa = GER_technocracy
		subject_canton = GER_technocracy
		priority = 1501
		trigger = { 
			scope:actor ?= {
				OR = {
					has_law = law_type:law_presidential_republic
					has_law = law_type:law_parliamentary_republic
				}
				has_law = law_type:law_technocracy
			}
		}
	}
	
	## South German generic ##
	
	flag_definition = {
		coa = GER_SGF
		subject_canton = GER_SGF
		priority = 2
		
		trigger = {
			exists = c:GER
			c:GER = {
				OR = {
					AND = {
						ruler = { has_culture = cu:south_german }
						NOT = { capital = { region = sr:region_north_germany } }
					}
					capital = { region = sr:region_south_germany }
					capital = { region = sr:region_danubia }
				}
			}
		}
	}
	flag_definition = {
		coa = GER_SGF_absolute_monarchy
		subject_canton = GER_SGF_iron_cross
		priority = 6
		trigger = {
			coa_def_autocracy_flag_trigger = yes
			
			exists = c:GER
			c:GER = {
				OR = {
					AND = {
						ruler = { has_culture = cu:south_german }
						NOT = { capital = { region = sr:region_north_germany } }
					}
					capital = { region = sr:region_south_germany }
					capital = { region = sr:region_danubia }
				}
			}
		}
	}
	flag_definition = {
		coa = GER_SGF_modern
		subject_canton = GER_SGF_modern
		priority = 11
		trigger = { 
			coa_def_republic_flag_trigger = yes
			
			exists = c:GER
			c:GER = {
				OR = {
					AND = {
						ruler = { has_culture = cu:south_german }
						NOT = { capital = { region = sr:region_north_germany } }
					}
					capital = { region = sr:region_south_germany }
					capital = { region = sr:region_danubia }
				}
			}
		}
	}
	flag_definition = {
		coa = GER_SGF_dictatorship
		subject_canton = GER_SGF_dictatorship
		priority = 20
		trigger = { 
			coa_def_dictatorship_flag_trigger = yes
			
			exists = c:GER
			c:GER = {
				OR = {
					AND = {
						ruler = { has_culture = cu:south_german }
						NOT = { capital = { region = sr:region_north_germany } }
					}
					capital = { region = sr:region_south_germany }
					capital = { region = sr:region_danubia }
				}
			}
		}
	}
	flag_definition = {
		coa = GER_SGF_communist
		subject_canton = GER_SGF_communist
		priority = 1501
		trigger = { 
			coa_def_communist_flag_trigger = yes
			
			exists = c:GER
			c:GER = {
				OR = {
					AND = {
						ruler = { has_culture = cu:south_german }
						NOT = { capital = { region = sr:region_north_germany } }
					}
					capital = { region = sr:region_south_germany }
					capital = { region = sr:region_danubia }
				}
			}
		}
	}	
	flag_definition = {
		coa = GER_SGF_fascist
		subject_canton = GER_SGF_fascist
		priority = 1501
		trigger = { 
			coa_def_fascist_flag_trigger = yes
			
			exists = c:GER
			c:GER = {
				OR = {
					AND = {
						ruler = { has_culture = cu:south_german }
						NOT = { capital = { region = sr:region_north_germany } }
					}
					capital = { region = sr:region_south_germany }
					capital = { region = sr:region_danubia }
				}
			}
		}
	}
	
	flag_definition = {
		coa = GER_SGF_anarchist
		subject_canton = GER_SGF_anarchist
		priority = 1502
		trigger = { 
			coa_def_anarchy_flag_trigger = yes
			
			exists = c:GER
			c:GER = {
				OR = {
					AND = {
						ruler = { has_culture = cu:south_german }
						NOT = { capital = { region = sr:region_north_germany } }
					}
					capital = { region = sr:region_south_germany }
					capital = { region = sr:region_danubia }
				}
			}
		}
	}
	
	flag_definition = {
		coa = GER_SGF_theocracy
		subject_canton = GER_SGF_theocracy
		priority = 20
		trigger = { 
			coa_def_theocracy_flag_trigger = yes
			
			exists = c:GER
			c:GER = {
				OR = {
					AND = {
						ruler = { has_culture = cu:south_german }
						NOT = { capital = { region = sr:region_north_germany } }
					}
					capital = { region = sr:region_south_germany }
					capital = { region = sr:region_danubia }
				}
			}
		}
	}
	
	flag_definition = {
		coa = GER_SGF_nihilist
		subject_canton = GER_SGF_nihilist
		priority = 1502
		trigger = { 
			coa_def_nihilist_flag_trigger = yes
			
			exists = c:GER
			c:GER = {
				OR = {
					AND = {
						ruler = { has_culture = cu:south_german }
						NOT = { capital = { region = sr:region_north_germany } }
					}
					capital = { region = sr:region_south_germany }
					capital = { region = sr:region_danubia }
				}
			}
		}
	}
	
	flag_definition = {
		coa = GER_SGF_technocracy
		subject_canton = GER_SGF_technocracy
		priority = 1501
		trigger = { 
			scope:actor ?= {
				OR = {
					has_law = law_type:law_presidential_republic
					has_law = law_type:law_parliamentary_republic
				}
				has_law = law_type:law_technocracy
			}
			
			exists = c:GER
			c:GER = {
				OR = {
					AND = {
						ruler = { has_culture = cu:south_german }
						NOT = { capital = { region = sr:region_north_germany } }
					}
					capital = { region = sr:region_south_germany }
					capital = { region = sr:region_danubia }
				}
			}
		}
	}
	
	# Force North or South German portraits
	
	flag_definition = {
		coa = GER_WB_default 
		subject_canton = GER_WB_default
		priority = 100
		
		trigger = {			
			exists = c:GER
			c:GER = { has_variable = WB_force_NGF_portrait_var }
		}
	}
	flag_definition = {
		coa = GER_NGF_absolute_monarchy # WB edit
		subject_canton = GER_NGF_absolute_monarchy
		priority = 106
		trigger = {
			coa_def_autocracy_flag_trigger = yes
			
			exists = c:GER
			c:GER = { has_variable = WB_force_NGF_portrait_var }
		}
	}
	flag_definition = {
		coa = GER_modern
		subject_canton = GER_modern
		priority = 111
		trigger = { 
			coa_def_republic_flag_trigger = yes
			
			exists = c:GER
			c:GER = { has_variable = WB_force_NGF_portrait_var }
		}
	}
	flag_definition = {
		coa = GER_dictatorship
		subject_canton = GER_dictatorship
		priority = 120
		trigger = { 
			coa_def_dictatorship_flag_trigger = yes
			
			exists = c:GER
			c:GER = { has_variable = WB_force_NGF_portrait_var }
		}
	}
	flag_definition = {
		coa = GER_communist
		subject_canton = GER_communist
		priority = 1511
		trigger = { 
			coa_def_communist_flag_trigger = yes
			
			exists = c:GER
			c:GER = { has_variable = WB_force_NGF_portrait_var }
		}
	}	
	flag_definition = {
		coa = GER_fascist
		subject_canton = GER_fascist
		priority = 1511
		trigger = { 
			coa_def_fascist_flag_trigger = yes
			
			exists = c:GER
			c:GER = { has_variable = WB_force_NGF_portrait_var }
		}
	}		
	
	flag_definition = {
		coa = NGF_anarchist
		subject_canton = NGF_anarchist
		priority = 1512
		trigger = { 
			coa_def_anarchy_flag_trigger = yes
			
			exists = c:GER
			c:GER = { has_variable = WB_force_NGF_portrait_var }
		}
	}
	
	flag_definition = {
		coa = GER_theocracy
		subject_canton = GER_theocracy
		priority = 115
		trigger = { 
			coa_def_theocracy_flag_trigger = yes
			
			exists = c:GER
			c:GER = { has_variable = WB_force_NGF_portrait_var }
		}
	}
	
	flag_definition = {
		coa = GER_nihilist
		subject_canton = GER_nihilist
		priority = 1512
		trigger = { 
			coa_def_nihilist_flag_trigger = yes
			
			exists = c:GER
			c:GER = { has_variable = WB_force_NGF_portrait_var }
		}
	}
	
	flag_definition = {
		coa = GER_technocracy
		subject_canton = GER_technocracy
		priority = 1511
		trigger = { 
			scope:actor ?= {
				OR = {
					has_law = law_type:law_presidential_republic
					has_law = law_type:law_parliamentary_republic
				}
				has_law = law_type:law_technocracy
			}
			
			exists = c:GER
			c:GER = { has_variable = WB_force_NGF_portrait_var }
		}
	}
	
	flag_definition = {
		coa = GER_SGF
		subject_canton = GER_SGF
		priority = 100
		
		trigger = {
			exists = c:GER
			c:GER = { has_variable = WB_force_SGF_portrait_var }
		}
	}
	flag_definition = {
		coa = GER_SGF_absolute_monarchy
		subject_canton = GER_SGF_iron_cross
		priority = 106
		trigger = {
			coa_def_autocracy_flag_trigger = yes
			
			exists = c:GER
			c:GER = { has_variable = WB_force_SGF_portrait_var }
		}
	}
	flag_definition = {
		coa = GER_SGF_modern
		subject_canton = GER_SGF_modern
		priority = 111
		trigger = { 
			coa_def_republic_flag_trigger = yes
			
			exists = c:GER
			c:GER = { has_variable = WB_force_SGF_portrait_var }
		}
	}
	flag_definition = {
		coa = GER_SGF_dictatorship
		subject_canton = GER_SGF_dictatorship
		priority = 120
		trigger = { 
			coa_def_dictatorship_flag_trigger = yes
			
			exists = c:GER
			c:GER = { has_variable = WB_force_SGF_portrait_var }
		}
	}
	flag_definition = {
		coa = GER_SGF_communist
		subject_canton = GER_SGF_communist
		priority = 1511
		trigger = { 
			coa_def_communist_flag_trigger = yes
			
			exists = c:GER
			c:GER = { has_variable = WB_force_SGF_portrait_var }
		}
	}
	flag_definition = {
		coa = GER_SGF_fascist
		subject_canton = GER_SGF_fascist
		priority = 1511
		trigger = { 
			coa_def_fascist_flag_trigger = yes
			
			exists = c:GER
			c:GER = { has_variable = WB_force_SGF_portrait_var }
		}
	}
	
	flag_definition = {
		coa = GER_SGF_anarchist
		subject_canton = GER_SGF_anarchist
		priority = 1512
		trigger = { 
			coa_def_anarchy_flag_trigger = yes
			
			exists = c:GER
			c:GER = { has_variable = WB_force_SGF_portrait_var }
		}
	}
	
	flag_definition = {
		coa = GER_SGF_theocracy
		subject_canton = GER_SGF_theocracy
		priority = 1512
		trigger = { 
			coa_def_theocracy_flag_trigger = yes
			
			exists = c:GER
			c:GER = { has_variable = WB_force_SGF_portrait_var }
		}
	}
	
	flag_definition = {
		coa = GER_SGF_nihilist
		subject_canton = GER_SGF_nihilist
		priority = 1512
		trigger = { 
			coa_def_nihilist_flag_trigger = yes
			
			exists = c:GER
			c:GER = { has_variable = WB_force_SGF_portrait_var }
		}
	}
	
	flag_definition = {
		coa = GER_SGF_technocracy
		subject_canton = GER_SGF_technocracy
		priority = 1511
		trigger = { 
			scope:actor ?= {
				OR = {
					has_law = law_type:law_presidential_republic
					has_law = law_type:law_parliamentary_republic
				}
				has_law = law_type:law_technocracy
			}
			
			exists = c:GER
			c:GER = { has_variable = WB_force_SGF_portrait_var }
		}
	}
	
	## Prussia Germany ##
	
	
	flag_definition = {
		coa = GER_PRU
		subject_canton = GER_PRU
		priority = 200
		
		trigger = { 
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Prussia_var }
		}
	}
	flag_definition = {
		coa = GER_PRU_iron_cross
		subject_canton = GER_PRU_iron_cross
		priority = 205
		trigger = {
			coa_def_autocracy_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Prussia_var }
		}
	}
	flag_definition = {
		coa = GER_PRU_modern
		subject_canton = GER_PRU_modern
		priority = 210
		trigger = { 
			coa_def_republic_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Prussia_var }
		}
	}
	flag_definition = {
		coa = GER_PRU_dictatorship
		subject_canton = GER_PRU_dictatorship
		priority = 215
		trigger = { 
			coa_def_dictatorship_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Prussia_var }
		}
	}
	flag_definition = {
		coa = GER_PRU_communist
		subject_canton = GER_PRU_communist
		priority = 1600
		trigger = { 
			coa_def_communist_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Prussia_var }
		}
	}	
	flag_definition = {
		coa = GER_PRU_fascist
		subject_canton = GER_PRU_fascist
		priority = 1600
		trigger = { 
			coa_def_fascist_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Prussia_var }
		}
	}
	
	flag_definition = {
		coa = GER_PRU_anarchist
		subject_canton = GER_PRU_anarchist
		priority = 1602
		trigger = { 
			coa_def_anarchy_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Prussia_var }
		}
	}
	
	flag_definition = {
		coa = GER_PRU_theocracy
		subject_canton = GER_PRU_theocracy
		priority = 220
		trigger = {
			coa_def_theocracy_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Prussia_var }
		}
	}
	
	# Only if your Prussia Germany is an autocratic communist state or if you are communist with the secret police law
	flag_definition = {
		coa = GER_PRU_communist_autocratic
		subject_canton = GER_PRU_communist_autocratic
		priority = 1602
		trigger = { 
			coa_def_communist_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Prussia_var }
			scope:actor = { 
				OR = {
					has_law = law_type:law_autocracy
					has_law = law_type:law_secret_police
				}
			}
		}
	}
	
	flag_definition = {
		coa = GER_PRU_nihilist
		subject_canton = GER_PRU_nihilist
		priority = 1601
		trigger = { 
			coa_def_nihilist_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Prussia_var }
		}
	}
	
	flag_definition = {
		coa = GER_PRU_technocracy
		subject_canton = GER_PRU_technocracy
		priority = 1601
		trigger = { 
			scope:actor ?= {
				OR = {
					has_law = law_type:law_presidential_republic
					has_law = law_type:law_parliamentary_republic
				}
				has_law = law_type:law_technocracy
				has_variable = WB_is_Prussia_var
			}
		}
	}
	
	flag_definition = {
		coa = GER_PRU_monarchy_technocracy
		subject_canton = GER_PRU_monarchy_technocracy
		priority = 1602
		trigger = {
			scope:actor ?= {
				AND = {
					has_law = law_type:law_monarchy
					has_law = law_type:law_technocracy
				}
				NOT = { has_law = law_type:law_anarchy }
				has_variable = WB_is_Prussia_var
			}
		}
	}
	
	flag_definition = {
		coa = GER_PRU_communist_technocracy
		subject_canton = GER_PRU_communist_technocracy
		priority = 1601
		trigger = {
			scope:actor ?= {
				AND = {
					has_law = law_type:law_council_republic
					has_law = law_type:law_technocracy
				}
				NOT = { has_law = law_type:law_anarchy }
				has_variable = WB_is_Prussia_var
			}
		}
	}
	
	## Austria Germany ##
	
	flag_definition = {
		coa = GER_austrian
		subject_canton = GER_austrian
		priority = 200
		trigger = {
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Austria_var }
		}
	}
	
	flag_definition = {
		coa = GER_Austria
		subject_canton = GER_Austria
		priority = 207
		trigger = {
			coa_def_absolute_monarchy_flag_trigger = yes
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Austria_var }
		}
	}
	
	flag_definition = {
		coa = GER_iron_cross_Austria
		subject_canton = GER_iron_cross_Austria
		priority = 206
		trigger = {
			coa_def_autocracy_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Austria_var }
		}
	}
	flag_definition = {
		coa = GER_modern_Austria
		subject_canton = GER_modern_Austria
		priority = 210
		trigger = { 
			coa_def_republic_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Austria_var }
		}
	}
	flag_definition = {
		coa = GER_dictatorship_Austria
		subject_canton = GER_dictatorship_Austria
		priority = 215
		trigger = { 
			coa_def_dictatorship_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Austria_var }
		}
	}
	flag_definition = {
		coa = GER_communist_Austria
		subject_canton = GER_communist_Austria
		priority = 1600
		trigger = { 
			coa_def_communist_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Austria_var }
		}
	}	
	flag_definition = {
		coa = GER_fascist_Austria
		subject_canton = GER_fascist_Austria
		priority = 1600
		trigger = { 
			coa_def_fascist_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Austria_var }
		}
	}
	
	flag_definition = {
		coa = AUS_anarchist
		subject_canton = AUS_anarchist
		priority = 1601
		trigger = { 
			coa_def_anarchy_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Austria_var }
		}
	}
	
	flag_definition = {
		coa = GER_theocracy_Austria
		subject_canton = GER_theocracy_Austria
		priority = 215
		trigger = { 
			coa_def_theocracy_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Austria_var }
		}
	}
	
	flag_definition = {
		coa = GER_nihilist_Austria
		subject_canton = GER_nihilist_Austria
		priority = 1601
		trigger = { 
			coa_def_nihilist_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Austria_var }
		}
	}
	
	flag_definition = {
		coa = GER_technocracy_Austria
		subject_canton = GER_technocracy_Austria
		priority = 1601
		trigger = { 
			scope:actor ?= {
				OR = {
					has_law = law_type:law_presidential_republic
					has_law = law_type:law_parliamentary_republic
				}
				has_law = law_type:law_technocracy
				has_variable = WB_is_Austria_var
			}
		}
	}
	
	## Austria-Hungary Germany ##
	
	flag_definition = {
		coa = GER_austro_hungarian
		subject_canton = GER_austro_hungarian
		priority = 300
		trigger = {
			exists = scope:actor
			OR = {
				AND = {
					scope:actor = { has_variable = WB_is_Austria_Hungary_var }
					NOT = { exists = c:HUN }
				}
				
				scope:actor = { has_variable = WB_force_use_Austria_Hungary_var }
			}
		}
	}
	
	flag_definition = {
		coa = GER_austro_hungarian_absolute_monarchy
		subject_canton = GER_austro_hungarian_absolute_monarchy
		priority = 307
		trigger = {
			coa_def_absolute_monarchy_flag_trigger = yes
			
			exists = scope:actor
			OR = {
				AND = {
					scope:actor = { has_variable = WB_is_Austria_Hungary_var }
					NOT = { exists = c:HUN }
				}
				
				scope:actor = { has_variable = WB_force_use_Austria_Hungary_var }
			}
		}
	}
	
	flag_definition = {
		coa = GER_iron_cross_austro_hungarian
		subject_canton = GER_iron_cross_austro_hungarian
		priority = 306
		trigger = {
			coa_def_autocracy_flag_trigger = yes
			
			exists = scope:actor
			OR = {
				AND = {
					scope:actor = { has_variable = WB_is_Austria_Hungary_var }
					NOT = { exists = c:HUN }
				}
				
				scope:actor = { has_variable = WB_force_use_Austria_Hungary_var }
			}
		}
	}
	flag_definition = {
		coa = GER_modern_austro_hungarian
		subject_canton = GER_modern_austro_hungarian
		priority = 310
		trigger = { 
			coa_def_republic_flag_trigger = yes
			
			exists = scope:actor
			OR = {
				AND = {
					scope:actor = { has_variable = WB_is_Austria_Hungary_var }
					NOT = { exists = c:HUN }
				}
				
				scope:actor = { has_variable = WB_force_use_Austria_Hungary_var }
			}
		}
	}
	flag_definition = {
		coa = GER_dictatorship_austro_hungarian
		subject_canton = GER_dictatorship_austro_hungarian
		priority = 315
		trigger = { 
			coa_def_dictatorship_flag_trigger = yes
			
			exists = scope:actor
			OR = {
				AND = {
					scope:actor = { has_variable = WB_is_Austria_Hungary_var }
					NOT = { exists = c:HUN }
				}
				
				scope:actor = { has_variable = WB_force_use_Austria_Hungary_var }
			}
		}
	}
	flag_definition = {
		coa = GER_communist_austro_hungarian
		subject_canton = GER_communist_austro_hungarian
		priority = 1700
		trigger = { 
			coa_def_communist_flag_trigger = yes
			
			exists = scope:actor
			OR = {
				AND = {
					scope:actor = { has_variable = WB_is_Austria_Hungary_var }
					NOT = { exists = c:HUN }
				}
				
				scope:actor = { has_variable = WB_force_use_Austria_Hungary_var }
			}
		}
	}	
	flag_definition = {
		coa = GER_fascist_austro_hungarian
		subject_canton = GER_fascist_austro_hungarian
		priority = 1700
		trigger = { 
			coa_def_fascist_flag_trigger = yes
			
			exists = scope:actor
			OR = {
				AND = {
					scope:actor = { has_variable = WB_is_Austria_Hungary_var }
					NOT = { exists = c:HUN }
				}
				
				scope:actor = { has_variable = WB_force_use_Austria_Hungary_var }
			}
		}
	}
	
	flag_definition = {
		coa = AUS_Austria_Hungary_anarchist
		subject_canton = AUS_Austria_Hungary_anarchist
		priority = 1701
		trigger = {
			coa_def_anarchy_flag_trigger = yes
			
			exists = scope:actor
			OR = {
				AND = {
					scope:actor = { has_variable = WB_is_Austria_Hungary_var }
					NOT = { exists = c:HUN }
				}
				
				scope:actor = { has_variable = WB_force_use_Austria_Hungary_var }
			}
		}
	}
	
	flag_definition = {
		coa = GER_theocracy_austro_hungarian
		subject_canton = GER_theocracy_Austria
		priority = 315
		trigger = { 
			coa_def_theocracy_flag_trigger = yes
			
			exists = scope:actor
			OR = {
				AND = {
					scope:actor = { has_variable = WB_is_Austria_Hungary_var }
					NOT = { exists = c:HUN }
				}
				
				scope:actor = { has_variable = WB_force_use_Austria_Hungary_var }
			}
		}
	}
	
	flag_definition = {
		coa = GER_nihilist_austro_hungarian
		subject_canton = GER_nihilist_austro_hungarian
		priority = 1701
		trigger = { 
			coa_def_nihilist_flag_trigger = yes
			
			exists = scope:actor
			OR = {
				AND = {
					scope:actor = { has_variable = WB_is_Austria_Hungary_var }
					NOT = { exists = c:HUN }
				}
				
				scope:actor = { has_variable = WB_force_use_Austria_Hungary_var }
			}
		}
	}
	
	flag_definition = {
		coa = GER_technocracy_austro_hungarian
		subject_canton = GER_technocracy_austro_hungarian
		priority = 1701
		trigger = { 
			scope:actor ?= {
				OR = {
					has_law = law_type:law_presidential_republic
					has_law = law_type:law_parliamentary_republic
				}
				has_law = law_type:law_technocracy
			}
			
			OR = {
				AND = {
					scope:actor ?= { has_variable = WB_is_Austria_Hungary_var }
					NOT = { exists = c:HUN }
				}
				
				scope:actor ?= { has_variable = WB_force_use_Austria_Hungary_var }
			}
		}
	}
	
	## Bavaria Germany ##
	
	flag_definition = {
		coa = GER_bavarian
		subject_canton = GER_bavarian
		priority = 200
		trigger = {
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Bavaria_var }
		}
	}
	
	flag_definition = {
		coa = GER_BAV_absolute_monarchy
		subject_canton = GER_BAV_absolute_monarchy
		priority = 207
		trigger = {
			coa_def_absolute_monarchy_flag_trigger = yes
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Bavaria_var }
		}
	}
	
	flag_definition = {
		coa = GER_BAV_iron_cross
		subject_canton = GER_BAV_iron_cross
		priority = 206
		trigger = {
			coa_def_autocracy_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Bavaria_var }
		}
	}
	flag_definition = {
		coa = GER_BAV_modern
		subject_canton = GER_BAV_modern
		priority = 210
		trigger = { 
			coa_def_republic_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Bavaria_var }
		}
	}
	flag_definition = {
		coa = GER_BAV_dictatorship
		subject_canton = GER_BAV_dictatorship
		priority = 215
		trigger = { 
			coa_def_dictatorship_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Bavaria_var }
		}
	}
	flag_definition = {
		coa = GER_BAV_communist
		subject_canton = GER_BAV_communist
		priority = 1600
		trigger = { 
			coa_def_communist_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Bavaria_var }
		}
	}	
	flag_definition = {
		coa = GER_BAV_fascist
		subject_canton = GER_BAV_fascist
		priority = 1600
		trigger = { 
			coa_def_fascist_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Bavaria_var }
		}
	}
	
	flag_definition = {
		coa = GER_BAV_theocracy
		subject_canton = GER_BAV_theocracy
		priority = 215
		trigger = { 
			coa_def_theocracy_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Bavaria_var }
		}
	}
	
	flag_definition = {
		coa = GER_BAV_anarchist
		subject_canton = GER_BAV_anarchist
		priority = 1602
		trigger = { 
			coa_def_anarchy_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Bavaria_var }
		}
	}
	
	flag_definition = {
		coa = GER_BAV_nihilist
		subject_canton = GER_BAV_nihilist
		priority = 1601
		trigger = { 
			coa_def_nihilist_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Bavaria_var }
		}
	}
	
	flag_definition = {
		coa = GER_BAV_technocracy
		subject_canton = GER_BAV_technocracy
		priority = 1601
		trigger = { 
			scope:actor ?= {
				OR = {
					has_law = law_type:law_presidential_republic
					has_law = law_type:law_parliamentary_republic
				}
				has_law = law_type:law_technocracy
				has_variable = WB_is_Bavaria_var
			}
		}
	}
	
	# Hanover Germany
	
	flag_definition = {
		coa = GER_hanover
		subject_canton = GER_hanover
		priority = 100
		trigger = {
			OR = {
				coa_def_monarchy_flag_trigger = yes
				coa_def_theocracy_flag_trigger = yes
			}
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Hanover_var }
		}
	}
	
	flag_definition = {
		coa = GER_HAN_absolute_monarchy
		subject_canton = GER_HAN_absolute_monarchy
		priority = 206
		trigger = {
			coa_def_autocracy_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Hanover_var }
		}
	}
	flag_definition = {
		coa = GER_HAN_modern
		subject_canton = GER_HAN_modern
		priority = 210
		trigger = { 
			coa_def_republic_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Hanover_var }
		}
	}
	flag_definition = {
		coa = GER_HAN_dictatorship
		subject_canton = GER_HAN_dictatorship
		priority = 215
		trigger = { 
			coa_def_dictatorship_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Hanover_var }
		}
	}
	flag_definition = {
		coa = GER_HAN_communist
		subject_canton = GER_HAN_communist
		priority = 1600
		trigger = { 
			coa_def_communist_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Hanover_var }
		}
	}	
	flag_definition = {
		coa = GER_HAN_fascist
		subject_canton = GER_HAN_fascist
		priority = 1600
		trigger = { 
			coa_def_fascist_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Hanover_var }
		}
	}
	
	flag_definition = {
		coa = GER_HAN_theocracy
		subject_canton = GER_HAN_theocracy
		priority = 215
		trigger = { 
			coa_def_theocracy_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Hanover_var }
		}
	}
	
	flag_definition = {
		coa = GER_HAN_anarchist
		subject_canton = GER_HAN_anarchist
		priority = 1602
		trigger = { 
			coa_def_anarchy_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Hanover_var }
		}
	}
	
	flag_definition = {
		coa = GER_HAN_nihilist
		subject_canton = GER_HAN_nihilist
		priority = 1601
		trigger = { 
			coa_def_nihilist_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Hanover_var }
		}
	}
	
	flag_definition = {
		coa = GER_hanover_war
		subject_canton = GER_hanover_war
		priority = 101
		trigger = {
			OR = {
				coa_def_monarchy_flag_trigger = yes
				coa_def_theocracy_flag_trigger = yes
			}
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Hanover_var }
			
			coa_def_war_trigger = yes
		}
	}
	
	flag_definition = {
		coa = GER_HAN_absolute_monarchy_war
		subject_canton = GER_HAN_absolute_monarchy_war
		priority = 207
		trigger = {
			coa_def_autocracy_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Hanover_var }
			
			coa_def_war_trigger = yes
		}
	}
	flag_definition = {
		coa = GER_HAN_modern_war
		subject_canton = GER_HAN_modern_war
		priority = 211
		trigger = { 
			coa_def_republic_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Hanover_var }
			
			coa_def_war_trigger = yes
		}
	}
	flag_definition = {
		coa = GER_HAN_dictatorship_war
		subject_canton = GER_HAN_dictatorship_war
		priority = 216
		trigger = { 
			coa_def_dictatorship_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Hanover_var }
			
			coa_def_war_trigger = yes
		}
	}
	flag_definition = {
		coa = GER_HAN_communist_war
		subject_canton = GER_HAN_communist_war
		priority = 1601
		trigger = { 
			coa_def_communist_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Hanover_var }
			
			coa_def_war_trigger = yes
		}
	}	
	flag_definition = {
		coa = GER_HAN_fascist_war
		subject_canton = GER_HAN_fascist_war
		priority = 1601
		trigger = { 
			coa_def_fascist_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Hanover_var }
			
			coa_def_war_trigger = yes
		}
	}
	
	flag_definition = {
		coa = GER_HAN_theocracy_war
		subject_canton = GER_HAN_theocracy_war
		priority = 216
		trigger = { 
			coa_def_theocracy_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Hanover_var }
			
			coa_def_war_trigger = yes
		}
	}
	
	flag_definition = {
		coa = GER_HAN_anarchist_war
		subject_canton = GER_HAN_anarchist_war
		priority = 1603
		trigger = { 
			coa_def_anarchy_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Hanover_var }
			
			coa_def_war_trigger = yes
		}
	}
	
	flag_definition = {
		coa = GER_HAN_nihilist_war
		subject_canton = GER_HAN_nihilist_war
		priority = 1602
		trigger = { 
			coa_def_nihilist_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Hanover_var }
			
			coa_def_war_trigger = yes
		}
	}
	
	flag_definition = {
		coa = GER_HAN_dictatorship_alt
		subject_canton = GER_HAN_dictatorship_alt
		priority = 216
		trigger = { 
			coa_def_dictatorship_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Hanover_var }
			scope:actor ?= { has_variable = WB_Hanover_dictator_alt_var }
		}
	}
	
	flag_definition = {
		coa = GER_HAN_dictatorship_alt_war
		subject_canton = GER_HAN_dictatorship_alt_war
		priority = 217
		trigger = { 
			coa_def_dictatorship_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Hanover_var }
			scope:actor ?= { has_variable = WB_Hanover_dictator_alt_var }
			
			coa_def_war_trigger = yes
		}
	}
	
	flag_definition = {
		coa = GER_HAN_fascist_alt
		subject_canton = GER_HAN_fascist_alt
		priority = 1602
		trigger = { 
			coa_def_fascist_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Hanover_var }
			scope:actor ?= { has_variable = WB_Hanover_dictator_alt_var }
			
			coa_def_war_trigger = yes
		}
	}
	
	flag_definition = {
		coa = GER_HAN_fascist_alt_war
		subject_canton = GER_HAN_fascist_alt_war
		priority = 1603
		trigger = { 
			coa_def_fascist_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Hanover_var }
			scope:actor ?= { has_variable = WB_Hanover_dictator_alt_var }
			
			coa_def_war_trigger = yes
		}
	}
	
	flag_definition = {
		coa = GER_HAN_technocracy
		subject_canton = GER_HAN_technocracy
		priority = 1601
		trigger = { 
			scope:actor ?= {
				OR = {
					has_law = law_type:law_presidential_republic
					has_law = law_type:law_parliamentary_republic
				}
				has_law = law_type:law_technocracy
				has_variable = WB_is_Hanover_var
			}
		}
	}
	
	flag_definition = {
		coa = GER_HAN_technocracy_war
		subject_canton = GER_HAN_technocracy_war
		priority = 1602
		trigger = { 
			scope:actor ?= {
				OR = {
					has_law = law_type:law_presidential_republic
					has_law = law_type:law_parliamentary_republic
				}
				has_law = law_type:law_technocracy
				has_variable = WB_is_Hanover_var
			}
			
			coa_def_war_trigger = yes
		}
	}
	
	# Schleswig Germany
	
	flag_definition = {
		coa = GER_schleswig
		subject_canton = GER_schleswig
		priority = 100
		trigger = {
			OR = {
				coa_def_monarchy_flag_trigger = yes
				coa_def_theocracy_flag_trigger = yes
			}
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Schleswig_var }
		}
	}
	
	# Westphalia Germany
	
	flag_definition = {
		coa = GER_westphalia
		subject_canton = GER_westphalia
		priority = 100
		trigger = {
			OR = {
				coa_def_monarchy_flag_trigger = yes
				coa_def_theocracy_flag_trigger = yes
			}
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Westphalia_var }
		}
	}
	
	# Saxe-Weimar Germany
	
	flag_definition = {
		coa = GER_saxe_weimar
		subject_canton = GER_saxe_weimar
		priority = 100
		trigger = {
			OR = {
				coa_def_monarchy_flag_trigger = yes
				coa_def_theocracy_flag_trigger = yes
			}
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Saxe_Weimar_var }
		}
	}
	
	# Mecklenburg Germany
	
	flag_definition = {
		coa = GER_mecklenburg
		subject_canton = GER_mecklenburg
		priority = 100
		trigger = {
			OR = {
				coa_def_monarchy_flag_trigger = yes
				coa_def_theocracy_flag_trigger = yes
			}
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Mecklenburg_var }
		}
	}
	
	# Saxony Germany
	
	flag_definition = {
		coa = GER_saxony
		subject_canton = GER_saxony
		priority = 100
		trigger = {
			OR = {
				coa_def_monarchy_flag_trigger = yes
				coa_def_theocracy_flag_trigger = yes
			}
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Saxony_var }
		}
	}
	
	# Pommerania Germany
	
	flag_definition = {
		coa = GER_pommerania
		subject_canton = GER_pommerania
		priority = 100
		trigger = {
			OR = {
				coa_def_monarchy_flag_trigger = yes
				coa_def_theocracy_flag_trigger = yes
			}
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Pommerania_var }
		}
	}
	
}

NGF = { # North Germany
	#includes = GER
	flag_definition = {
		coa = NGF
		subject_canton = NGF		
	}	
	flag_definition = {
		coa = NGF_absolute_monarchy
		subject_canton = NGF_absolute_monarchy
		priority = 55
		trigger = { 
			coa_def_absolute_monarchy_flag_trigger = yes
		}
	}
	flag_definition = {
		coa = NGF_fascist
		subject_canton = NGF_fascist
		priority = 1500
		trigger = { 
			coa_def_fascist_flag_trigger = yes
		}
	}	
	
	# WB originals
	
	flag_definition = {
		coa = NGF_communist
		subject_canton = NGF_communist
		priority = 1500
		trigger = { 
			coa_def_communist_flag_trigger = yes
		}
	}
	
	flag_definition = {
		coa = GER_modern
		subject_canton = GER_modern
		priority = 60
		trigger = { 
			coa_def_republic_flag_trigger = yes
		}
	}
	flag_definition = {
		coa = NGF_dictatorship
		subject_canton = NGF_dictatorship
		priority = 65
		trigger = { 
			coa_def_dictatorship_flag_trigger = yes
		}
	}
	
	flag_definition = {
		coa = NGF_anarchist
		subject_canton = NGF_anarchist
		priority = 1501
		trigger = { 
			coa_def_anarchy_flag_trigger = yes
		}
	}
	
	flag_definition = {
		coa = GER_theocracy
		subject_canton = GER_theocracy
		priority = 15
		trigger = { 
			coa_def_theocracy_flag_trigger = yes
		}
	}
	
	flag_definition = {
		coa = GER_fascist
		subject_canton = GER_fascist
		priority = 100
		trigger = { 
			coa_def_fascist_flag_trigger = yes
		}
	}
	
	## Prussia NGF 
	
	flag_definition = {
		coa = NGF_PRU
		subject_canton = NGF_PRU	
		priority = 200
		
		trigger = {
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Prussia_var }
		}
	}	
	
	flag_definition = {
		coa = NGF_PRU_absolute_monarchy
		subject_canton = NGF_PRU_absolute_monarchy	
		
		priority = 205
		trigger = {
			coa_def_absolute_monarchy_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Prussia_var }
		}
	}
	
	flag_definition = {
		coa = GER_PRU_modern
		subject_canton = GER_PRU_modern
		priority = 210
		trigger = { 
			coa_def_republic_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Prussia_var }
		}
	}
	
	flag_definition = {
		coa = NGF_PRU_communist
		subject_canton = NGF_PRU_communist
		priority = 1510
		trigger = { 
			coa_def_communist_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Prussia_var }
		}
	}
	
	flag_definition = {
		coa = NGF_PRU_dictatorship
		subject_canton = NGF_PRU_dictatorship
		priority = 260
		trigger = { 
			coa_def_dictatorship_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Prussia_var }
		}
	}
	
	flag_definition = {
		coa = NGF_PRU_fascist
		subject_canton = NGF_PRU_fascist
		priority = 270
		trigger = { 
			coa_def_fascist_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Prussia_var }
		}
	}
	
	flag_definition = {
		coa = GER_PRU_theocracy
		subject_canton = GER_PRU_theocracy
		priority = 215
		trigger = { 
			coa_def_theocracy_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Prussia_var }
		}
	}
	
	flag_definition = {
		coa = GER_PRU_anarchist
		subject_canton = GER_PRU_anarchist
		priority = 1601
		trigger = { 
			coa_def_anarchy_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Prussia_var }
		}
	}
	
	flag_definition = {
		coa = NGF_PRU_technocracy
		subject_canton = NGF_PRU_technocracy
		priority = 1501
		trigger = { 
			scope:actor ?= {
				OR = {
					has_law = law_type:law_presidential_republic
					has_law = law_type:law_parliamentary_republic
				}
				has_law = law_type:law_technocracy
				has_variable = WB_is_Prussia_var
			}
		}
	}
	
	flag_definition = {
		coa = NGF_PRU_monarchy_technocracy
		subject_canton = NGF_PRU_monarchy_technocracy
		priority = 1502
		trigger = {
			scope:actor ?= {
				AND = {
					has_law = law_type:law_monarchy
					has_law = law_type:law_technocracy
				}
				NOT = { has_law = law_type:law_anarchy }
				has_variable = WB_is_Prussia_var
			}
		}
	}
	
	flag_definition = {
		coa = NGF_PRU_communist_technocracy
		subject_canton = NGF_PRU_communist_technocracy
		priority = 1602
		trigger = {
			scope:actor ?= {
				AND = {
					has_law = law_type:law_council_republic
					has_law = law_type:law_technocracy
				}
				NOT = { has_law = law_type:law_anarchy }
				has_variable = WB_is_Prussia_var
			}
		}
	}
	
	# Hanover NGF
	
	flag_definition = {
		coa = NGF_HAN
		subject_canton = NGF_HAN	
		priority = 200
		
		trigger = {
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Hanover_var }
		}
	}	
	
	flag_definition = {
		coa = NGF_HAN_absolute_monarchy
		subject_canton = NGF_HAN_absolute_monarchy	
		
		priority = 205
		trigger = {
			coa_def_absolute_monarchy_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Hanover_var }
		}
	}
	
	flag_definition = {
		coa = NGF_HAN_republic
		subject_canton = NGF_HAN_republic
		priority = 210
		trigger = { 
			coa_def_republic_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Hanover_var }
		}
	}
	
	flag_definition = {
		coa = NGF_HAN_communist
		subject_canton = NGF_HAN_communist
		priority = 1510
		trigger = { 
			coa_def_communist_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Hanover_var }
		}
	}
	
	flag_definition = {
		coa = NGF_HAN_fascist
		subject_canton = NGF_HAN_fascist
		priority = 270
		trigger = { 
			coa_def_fascist_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Hanover_var }
		}
	}
	
	flag_definition = {
		coa = NGF_HAN_dictatorship
		subject_canton = NGF_HAN_dictatorship
		priority = 260
		trigger = { 
			coa_def_dictatorship_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Hanover_var }
		}
	}
	
	flag_definition = {
		coa = GER_HAN_theocracy
		subject_canton = GER_HAN_theocracy
		priority = 215
		trigger = { 
			coa_def_theocracy_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Hanover_var }
		}
	}
	
	flag_definition = {
		coa = HAN_anarchist
		subject_canton = HAN_anarchist
		priority = 1601
		trigger = { 
			coa_def_anarchy_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Hanover_var }
		}
	}
	
	flag_definition = {
		coa = NGF_HAN_war
		subject_canton = NGF_HAN_war	
		priority = 201
		
		trigger = {
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Hanover_var }
			
			coa_def_war_trigger = yes
		}
	}	
	
	flag_definition = {
		coa = NGF_HAN_absolute_monarchy_war
		subject_canton = NGF_HAN_absolute_monarchy_war	
		
		priority = 206
		trigger = {
			coa_def_absolute_monarchy_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Hanover_var }
			
			coa_def_war_trigger = yes
		}
	}
	
	flag_definition = {
		coa = NGF_HAN_republic_war
		subject_canton = NGF_HAN_republic_war
		priority = 211
		trigger = { 
			coa_def_republic_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Hanover_var }
			
			coa_def_war_trigger = yes
		}
	}
	
	flag_definition = {
		coa = NGF_HAN_communist_war
		subject_canton = NGF_HAN_communist_war
		priority = 1511
		trigger = { 
			coa_def_communist_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Hanover_var }
			
			coa_def_war_trigger = yes
		}
	}
	
	flag_definition = {
		coa = NGF_HAN_fascist_war
		subject_canton = NGF_HAN_fascist_war
		priority = 271
		trigger = { 
			coa_def_fascist_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Hanover_var }
			
			coa_def_war_trigger = yes
		}
	}
	
	flag_definition = {
		coa = NGF_HAN_dictatorship_war
		subject_canton = NGF_HAN_dictatorship_war
		priority = 261
		trigger = { 
			coa_def_dictatorship_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Hanover_var }
			
			coa_def_war_trigger = yes
		}
	}
	
	flag_definition = {
		coa = GER_HAN_theocracy_war
		subject_canton = GER_HAN_theocracy_war
		priority = 2165
		trigger = { 
			coa_def_theocracy_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Hanover_var }
			
			coa_def_war_trigger = yes
		}
	}
	
	flag_definition = {
		coa = HAN_anarchist_war
		subject_canton = HAN_anarchist_war
		priority = 1602
		trigger = { 
			coa_def_anarchy_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Hanover_var }
			
			coa_def_war_trigger = yes
		}
	}
	
	
	flag_definition = {
		coa = NGF_HAN_dictatorship_alt
		subject_canton = NGF_HAN_dictatorship_alt
		priority = 261
		trigger = { 
			coa_def_dictatorship_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Hanover_var }
			scope:actor ?= { has_variable = WB_Hanover_dictator_alt_var }
		}
	}
	
	flag_definition = {
		coa = NGF_HAN_dictatorship_alt_war
		subject_canton = NGF_HAN_dictatorship_alt_war
		priority = 262
		trigger = { 
			coa_def_dictatorship_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Hanover_var }
			scope:actor ?= { has_variable = WB_Hanover_dictator_alt_var }
			
			coa_def_war_trigger = yes
		}
	}
	
	flag_definition = {
		coa = NGF_HAN_fascist_alt
		subject_canton = NGF_HAN_fascist_alt
		priority = 261
		trigger = { 
			coa_def_fascist_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Hanover_var }
			scope:actor ?= { has_variable = WB_Hanover_dictator_alt_var }
		}
	}
	
	flag_definition = {
		coa = NGF_HAN_fascist_alt_war
		subject_canton = NGF_HAN_fascist_alt_war
		priority = 262
		trigger = { 
			coa_def_fascist_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Hanover_var }
			scope:actor ?= { has_variable = WB_Hanover_dictator_alt_var }
			
			coa_def_war_trigger = yes
		}
	}
	
}

SGF = { # South German Federation
	flag_definition = {
		coa = SGF
		subject_canton = SGF
		priority = 1
	}
	flag_definition = {
		coa = SGF_republic
		subject_canton = SGF_republic
		priority = 10
		trigger = { 
			coa_def_republic_flag_trigger = yes
		}
	}
	flag_definition = {
		coa = SGF_fascist
		subject_canton = SGF_fascist
		priority = 1500
		trigger = { 
			OR = {
				coa_def_fascist_flag_trigger = yes
				coa_def_dictatorship_flag_trigger = yes
			}
		}
	}
	
	# WB originals
	
	flag_definition = {
		coa = SGF_absolute_monarchy
		subject_canton = SGF_absolute_monarchy
		priority = 20
		trigger = { 
			coa_def_absolute_monarchy_flag_trigger = yes
		}
	}
	
	flag_definition = {
		coa = SGF_communist
		subject_canton = SGF_communist
		priority = 1500
		trigger = { 
			coa_def_communist_flag_trigger = yes
		}
	}
	
	#WB anarchist flags
	flag_definition = {
		coa = SGF_anarchist
		subject_canton = SGF_anarchist
		priority = 1501
		trigger = { 
			coa_def_anarchy_flag_trigger = yes
		}
	}
	
	
	# SGF Austria
	
	flag_definition = {
		coa = SGF_AUS
		subject_canton = SGF_AUS
		priority = 10
			
		trigger = {
			exists = scope:actor
			exists = c:SGF
			OR = {
				scope:actor = { has_variable = WB_is_Austria_var }
				
				AND = {
					NOT = { exists = c:AUS }
					c:SGF = {			
						capital = { state_region = s:STATE_AUSTRIA }
					}
				}
			}
		}
	}
	flag_definition = {
		coa = SGF_AUS_republic
		subject_canton = SGF_AUS_republic
		priority = 15
		trigger = { 
			coa_def_republic_flag_trigger = yes
			
			exists = scope:actor
			exists = c:SGF
			OR = {
				scope:actor = { has_variable = WB_is_Austria_var }
				
				AND = {
					NOT = { exists = c:AUS }
					c:SGF = {			
						capital = { state_region = s:STATE_AUSTRIA }
					}
				}
			}
		}
	}
	flag_definition = {
		coa = SGF_AUS_fascist
		subject_canton = SGF_AUS_fascist
		priority = 1505
		trigger = { 
			OR = {
				coa_def_fascist_flag_trigger = yes
				coa_def_dictatorship_flag_trigger = yes
			}
			
			exists = scope:actor
			exists = c:SGF
			OR = {
				scope:actor = { has_variable = WB_is_Austria_var }
				
				AND = {
					NOT = { exists = c:AUS }
					c:SGF = {			
						capital = { state_region = s:STATE_AUSTRIA }
					}
				}
			}
		}
	}
	
	flag_definition = {
		coa = SGF_AUS_absolute_monarchy
		subject_canton = SGF_AUS_absolute_monarchy
		priority = 25
		trigger = { 
			coa_def_absolute_monarchy_flag_trigger = yes
			
			exists = scope:actor
			exists = c:SGF
			OR = {
				scope:actor = { has_variable = WB_is_Austria_var }
				
				AND = {
					NOT = { exists = c:AUS }
					c:SGF = {			
						capital = { state_region = s:STATE_AUSTRIA }
					}
				}
			}
		}
	}
	flag_definition = {
		coa = SGF_AUS_communist
		subject_canton = SGF_AUS_communist
		priority = 1505
		trigger = { 
			coa_def_communist_flag_trigger = yes
			
			exists = scope:actor
			exists = c:SGF
			OR = {
				scope:actor = { has_variable = WB_is_Austria_var }
				
				AND = {
					NOT = { exists = c:AUS }
					c:SGF = {			
						capital = { state_region = s:STATE_AUSTRIA }
					}
				}
			}
		}
	}
	
	#WB anarchist flags
	flag_definition = {
		coa = SGF_AUS_anarchist
		subject_canton = SGF_AUS_anarchist
		priority = 1506
		trigger = {
			coa_def_anarchy_flag_trigger = yes
			
			exists = scope:actor
			exists = c:SGF
			OR = {
				scope:actor = { has_variable = WB_is_Austria_var }
				
				AND = {
					NOT = { exists = c:AUS }
					c:SGF = {			
						capital = { state_region = s:STATE_AUSTRIA }
					}
				}
			}
		}
	}
	
	# SGF Bavaria
	
	flag_definition = {
		coa = SGF_BAV
		subject_canton = SGF_BAV
		priority = 11
			
		trigger = { 
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Bavaria_var }
		}
	}
	flag_definition = {
		coa = SGF_BAV_republic
		subject_canton = SGF_BAV_republic
		priority = 16
		trigger = { 
			coa_def_republic_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Bavaria_var }
		}
	}
	flag_definition = {
		coa = SGF_BAV_fascist
		subject_canton = SGF_BAV_fascist
		priority = 1506
		trigger = { 
			OR = {
				coa_def_fascist_flag_trigger = yes
				coa_def_dictatorship_flag_trigger = yes
			}
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Bavaria_var }
		}
	}
	
	flag_definition = {
		coa = SGF_BAV_absolute_monarchy
		subject_canton = SGF_BAV_absolute_monarchy
		priority = 26
		trigger = { 
			coa_def_absolute_monarchy_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Bavaria_var }
		}
	}
	flag_definition = {
		coa = SGF_BAV_communist
		subject_canton = SGF_BAV_communist
		priority = 1506
		trigger = { 
			coa_def_communist_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Bavaria_var }
		}
	}
	
	flag_definition = {
		coa = SGF_BAV_anarchist
		subject_canton = SGF_BAV_anarchist
		priority = 1507
		trigger = {
			coa_def_anarchy_flag_trigger = yes
			
			exists = scope:actor
			scope:actor = { has_variable = WB_is_Bavaria_var }
		}
	}
}